package com.person.mengshuai.mytestdemo.controller;


import com.person.mengshuai.mytestdemo.domain.response.Result;
import com.person.mengshuai.mytestdemo.service.BUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 系统管理 - 用户角色关联表  前端控制器
 * </p>
 *
 * @author ms
 * @since 2024-08-02
 */
@RestController
@RequestMapping("/b-user-role")
public class BUserRoleController {
    @Autowired
    private BUserRoleService bUserRoleService;

    /**
     * 插入用户角色
     *
     * @param userId 用户id
     * @param roleIds 角色id集合
     * @return 插入结果
     */
    @GetMapping("/insertUserRole")
    public Result insertUserRole(@RequestParam String userId, @RequestParam List<Integer> roleIds) {
        return bUserRoleService.insertUserRole(userId, roleIds);
    }

}
